﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;

namespace Irrlicht.Net.GUI
{
    public class CursorControl : ReferenceCounted
    {
        #region PInvoke
        [DllImport(@"IrrlichtW.dll", CallingConvention = CallingConvention.Cdecl)]
        internal static extern bool CursorControl_isVisible(IntPtr pointer);
        [DllImport(@"IrrlichtW.dll", CallingConvention = CallingConvention.Cdecl)]
        internal static extern void CursorControl_setVisible(IntPtr pointer, bool visible);

        #endregion

        internal static CursorControl CreateCursorControl(IntPtr pointer)
        {
            CursorControl cursorControl = new CursorControl();
            cursorControl.pointer = pointer;
            return cursorControl;
        }

        public bool Visible
        {
            set
            {
                CursorControl_setVisible(pointer, value);
            }

            get
            {
                return CursorControl_isVisible(pointer);
            }
        }
    }
}
